class EventFromTimeToEnum < ActiveRecord::Migration
  def self.up
    remove_column :events, :start_at
    remove_column :events, :end_at

    add_column :events, :event_type, :string
    add_column :events, :begin_date, :date
    add_column :events, :end_date,   :date

    add_column :users, :beginning_of_shift, :integer
    add_column :users, :end_of_shift,       :integer
  end

  def self.down
    add_column :events, :start_at, :datetime
    add_column :events, :end_at, :datetime

    remove_column :events, :event_type
    remove_column :events, :begin_date
    remove_column :events, :end_date  

    remove_column :users, :beginning_of_shift
    remove_column :users, :end_of_shift
  end
end
